/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.mahumLogs.backedbeans;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;

/**
 *
 * @author Edouard
 */
@Entity
public class TypeMachine implements Serializable{
    
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private int idTypeMachine;
    private String libelle;
    
    @OneToMany(mappedBy = "TypeMachine" ,cascade = CascadeType.PERSIST)
    private List<Machine> listeMachines = new ArrayList<>();

    /**
     * Constructeur vide
     */
    public TypeMachine() {
        
    }

    /**
     * @return idTypeMachine
     */
    public int getIdTypeMachine() {
        return idTypeMachine;
    }

    /**
     * @param idTypeMachine 
     */
    public void setIdTypeMachine(int idTypeMachine) {
        this.idTypeMachine = idTypeMachine;
    }

    /**
     * @return libelle (String)
     */
    public String getLibelle() {
        return libelle;
    }

    /**
     * @param libelle 
     */
    public void setLibelle(String libelle) {
        this.libelle = libelle;
    }

    /**
     * @return listeMachines
     */
    public List<Machine> getListeMachines() {
        return listeMachines;
    }

    /**
     * @param listeMachines 
     */
    public void setListeMachines(List<Machine> listeMachines) {
        this.listeMachines = listeMachines;
    }
}
